Stored Procedures [dbo].[aspnet_Profile_GetProperties]
Properties
PropertyValue
ANSI Nulls OnNo
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@ApplicationNamenvarchar(256)512
@UserNamenvarchar(256)512
@CurrentTimeUtcdatetime8
Permissions
TypeActionOwning Principal
GrantExecuteaspnet_Profile_BasicAccess
SQL Script
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE dbo.aspnet_Profile_GetProperties
    @ApplicationName      nvarchar(256),
    @UserName             nvarchar(256),
    @CurrentTimeUtc       datetime
AS
BEGIN
    DECLARE @ApplicationId uniqueidentifier
    SELECT  @ApplicationId = NULL
    SELECT  @ApplicationId = ApplicationId FROM dbo.aspnet_Applications WHERE LOWER(@ApplicationName) = LoweredApplicationName
    IF (@ApplicationId IS NULL)
        RETURN

    DECLARE @UserId uniqueidentifier
    SELECT  @UserId = NULL

    SELECT @UserId = UserId
    FROM   dbo.aspnet_Users
    WHERE  ApplicationId = @ApplicationId AND LoweredUserName = LOWER(@UserName)

    IF (@UserId IS NULL)
        RETURN
    SELECT TOP 1 PropertyNames, PropertyValuesString, PropertyValuesBinary
    FROM         dbo.aspnet_Profile
    WHERE        UserId = @UserId

    IF (@@ROWCOUNT > 0)
    BEGIN
        UPDATE dbo.aspnet_Users
        SET    LastActivityDate=@CurrentTimeUtc
        WHERE  UserId = @UserId
    END
END
GO
GRANT EXECUTE ON  [dbo].[aspnet_Profile_GetProperties] TO [aspnet_Profile_BasicAccess]
GO
Uses